<template>
	<view>
		<u-sticky bgColor="#fff">
			<u-navbar title="内容详情" @leftClick="onblock()" placeholder="true"></u-navbar>
		</u-sticky>
		<view class="scancont">
			<view v-if="cType == 0">
				<view class="sitem">
					<view class="pagetitle">基本信息</view>
					<view style="padding: 10px;">
						<u-form :model="contDetail" labelWidth="200rpx" labelAlign="right">
							<u-form-item label="车编号">{{ contDetail.vehiclenum || '--' }}</u-form-item>
							<u-form-item label="任务单编号">{{ contDetail.taskOrderNum || '--' }}</u-form-item>
							<u-form-item label="发货单编号">{{ contDetail.deliveryNo || '--' }}</u-form-item>
							<u-form-item label="企业名称">{{ contDetail.corpname || '--' }}</u-form-item>
							<u-form-item label="工程名称">{{ contDetail.projectname || '--' }}</u-form-item>
							<u-form-item label="工程地址">{{ contDetail.projectAddr || '--' }}</u-form-item>
							<u-form-item label="混凝土等级">{{ contDetail.strengthgrade || '--' }}</u-form-item>
							<u-form-item label="坍落度">{{ contDetail.slump || '--' }}</u-form-item>
							<u-form-item label="特殊要求">{{ contDetail.special || '--' }}</u-form-item>
							<u-form-item label="收货单位">{{ contDetail.receivingCorp || '--' }}</u-form-item>
							<u-form-item label="收货人电话">{{ contDetail.receivingTel || '--' }}</u-form-item>
							<u-form-item label="计划方量">{{ contDetail.planQuantity || '--' }}</u-form-item>
							<u-form-item label="施工部位">{{ contDetail.flowBuildingArea || '--' }}</u-form-item>
							<u-form-item label="浇筑方式">{{ contDetail.pouringMethod || '--' }}</u-form-item>
							<u-form-item label="合同编号">{{ contDetail.contractNum || '--' }}</u-form-item>
							<u-form-item label="泵工">{{ contDetail.pumpMan || '--' }}</u-form-item>
						</u-form>
					</view>
				</view>
				<view class="sitem" style="margin-top: 15px;">
					<view class="pagetitle">生产与运输信息</view>
					<view style="padding: 10px;">
						<u-form :model="contDetail" labelWidth="200rpx" labelAlign="right">
							<u-form-item label="拌台号">{{ contDetail.mixingPlantNum || '--' }}</u-form-item>
							<u-form-item label="累计车次">{{ contDetail.totalCarnum || '--' }}</u-form-item>
							<u-form-item label="本车量(m²)">{{ contDetail.thisQuantity || '--' }}</u-form-item>
							<u-form-item label="已完成量(m²)">{{ contDetail.totalQuantity || '--' }}</u-form-item>
							<u-form-item label="驾驶员">{{ contDetail.driver || '--' }}</u-form-item>
							<u-form-item label="运输车号">{{ contDetail.transitNo || '--' }}</u-form-item>
							<u-form-item label="发车时间">{{ contDetail.departTime || '--' }}</u-form-item>
							<u-form-item label="操作工">{{ contDetail.operator || '--' }}</u-form-item>
						</u-form>
					</view>
				</view>
				<view class="sitem filecn" style="margin-top: 15px;" v-if="contDetail.files?.length">
					<view class="pagetitle">材料信息</view>
					<view style="padding: 10px;">
						<view style="padding: 10px;background: #f5f5f5;display: flex;align-items: center;justify-content: space-between;border-radius: 5px;margin-bottom: 5px;" v-for="(item, index) in contDetail.files" :key="index" @click="fileview(item.url)">
							<view style="width: 35px;height: 35px;background: #F54A2E;border-radius: 5px;display: flex;align-items: center;justify-content: center;">
								<u-icon name="file-text" color="#fff" size="20"></u-icon>
							</view>
							<view style="flex: 1;white-space: nowrap;text-overflow: ellipsis;overflow: hidden;margin-left: 10px;font-size: 13px;">{{ item.fileName || item.originalName || '--' }}</view>
						</view>
					</view>
				</view>
			</view>
			<view v-if="cType == 1">
				<view class="sitem">
					<view class="pagetitle">基本信息</view>
					<view style="padding: 10px;">
						<u-form :model="contDetail" labelWidth="160rpx" labelAlign="right">
							<u-form-item label="企业名称">{{ contDetail.corpname || '--' }}</u-form-item>
							<u-form-item label="供应商">{{ contDetail.supplier || '--' }}</u-form-item>
							<u-form-item label="材料名称">{{ contDetail.material || '--' }}</u-form-item>
							<u-form-item label="样品编号">{{ contDetail.samplenum || '--' }}</u-form-item>
							<u-form-item label="检测项目">{{ contDetail.checkproject || '--' }}</u-form-item>
							<u-form-item label="检测标准">{{ contDetail.checkstandard || '--' }}</u-form-item>
							<u-form-item label="检测日期">{{ contDetail.checkdata || '--' }}</u-form-item>
							<u-form-item label="报告编号">{{ contDetail.reportnum || '--' }}</u-form-item>
							<u-form-item label="报告日期">{{ contDetail.reportdata || '--' }}</u-form-item>
							<u-form-item label="批准人">{{ contDetail.approver || '--' }}</u-form-item>
							<u-form-item label="审核人">{{ contDetail.reviewer || '--' }}</u-form-item>
							<u-form-item label="主检">{{ contDetail.mainpick || '--' }}</u-form-item>
							<u-form-item label="温度">{{ contDetail.temperature || '--' }}</u-form-item>
							<u-form-item label="湿度">{{ contDetail.humidity || '--' }}</u-form-item>
							<u-form-item label="检测状态">{{ contDetail.checkstate || '--' }}</u-form-item>
							<u-form-item label="检测结论">
								<u-tag :text="dictFn(concrete_conclusion,contDetail.checkconclusion, 0)" :type="dictFn(concrete_conclusion,contDetail.checkconclusion, 1)" v-if="contDetail.checkconclusion"></u-tag>
								<text v-else>--</text>
							</u-form-item>
						</u-form>
					</view>
				</view>
				<view class="sitem filecn" style="margin-top: 15px;" v-if="contDetail.files?.length">
					<view class="pagetitle">检测报告</view>
					<view style="padding: 10px;">
						<view style="padding: 10px;background: #f5f5f5;display: flex;align-items: center;justify-content: space-between;border-radius: 5px;margin-bottom: 5px;" v-for="(item, index) in contDetail.files" :key="index" @click="fileview(item.url)">
							<view style="width: 35px;height: 35px;background: #F54A2E;border-radius: 5px;display: flex;align-items: center;justify-content: center;">
								<u-icon name="file-text" color="#fff" size="20"></u-icon>
							</view>
							<view style="flex: 1;white-space: nowrap;text-overflow: ellipsis;overflow: hidden;margin-left: 10px;font-size: 13px;">{{ item.fileName || item.originalName || '--' }}</view>
						</view>
					</view>
				</view>
			</view>
			<view v-if="cType == 2">
				<view class="sitem">
					<view class="pagetitle">基本信息</view>
					<view style="padding: 10px;">
						<u-form :model="contDetail" labelWidth="160rpx" labelAlign="right">
							<u-form-item label="企业名称">{{ contDetail.corpname || '--' }}</u-form-item>
							<u-form-item label="工程名称">{{ contDetail.projectname || '--' }}</u-form-item>
							<u-form-item label="结构部位">{{ contDetail.structuralposition || '--' }}</u-form-item>
							<u-form-item label="使用部位">{{ contDetail.useposition || '--' }}</u-form-item>
							<u-form-item label="强度等级">{{ contDetail.strengthgrade || '--' }}</u-form-item>
							<u-form-item label="坍落度">{{ contDetail.slump || '--' }}</u-form-item>
							<u-form-item label="抗渗等级">{{ contDetail.imperviousgrade || '--' }}</u-form-item>
							<u-form-item label="使用气温">{{ contDetail.servicetemperature || '--' }}</u-form-item>
							<u-form-item label="其他要求">{{ contDetail.otherrequirements || '--' }}</u-form-item>
						</u-form>
					</view>
				</view>
				<view class="sitem" style="margin-top: 15px;">
					<view class="pagetitle">生产与检测信息
					</view>
					<view style="padding: 10px;">
						<u-form :model="contDetail" labelWidth="160rpx" labelAlign="right">
							<u-form-item label="拌和方法">{{ contDetail.mixmethod || '--' }}</u-form-item>
							<u-form-item label="捣实方法">{{ contDetail.tampingmethod || '--' }}</u-form-item>
							<u-form-item label="生产厂家">{{ contDetail.manufacturer || '--' }}</u-form-item>
							<u-form-item label="样品编号">{{ contDetail.samplenum || '--' }}</u-form-item>
							<u-form-item label="委托编号">{{ contDetail.entrustnum || '--' }}</u-form-item>
							<u-form-item label="报告编号">{{ contDetail.reportnum || '--' }}</u-form-item>
							<u-form-item label="检测标准">{{ contDetail.teststandard || '--' }}</u-form-item>
							<u-form-item label="检测依据">{{ contDetail.reportbasis || '--' }}</u-form-item>
							<u-form-item label="检验项目">{{ contDetail.testprojectname || '--' }}</u-form-item>
							<u-form-item label="检验类别">{{ contDetail.inspectiontype || '--' }}</u-form-item>
							<u-form-item label="检测参数">{{ contDetail.parameter || '--' }}</u-form-item>
							<u-form-item label="检测结论">{{ contDetail.testconclusion || '--' }}</u-form-item>
							<u-form-item label="检测日期">{{ contDetail.testdata || '--' }}</u-form-item>
							<u-form-item label="审核日期">{{ contDetail.examinedata || '--' }}</u-form-item>
							<u-form-item label="委托日期">{{ contDetail.entrustdata || '--' }}</u-form-item>
							<u-form-item label="批准日期">{{ contDetail.approvaldata || '--' }}</u-form-item>
							<u-form-item label="报告日期">{{ contDetail.reportdata || '--' }}</u-form-item>
						</u-form>
					</view>
				</view>
				<view class="sitem" style="margin-top: 15px;">
					<view class="pagetitle">人员与监督信息
					</view>
					<view style="padding: 10px;">
						<u-form :model="contDetail" labelWidth="160rpx" labelAlign="right">
							<u-form-item label="主检">{{ contDetail.maininspection || '--' }}</u-form-item>
							<u-form-item label="副检">{{ contDetail.assistantinspector || '--' }}</u-form-item>
							<u-form-item label="审核人员">{{ contDetail.examine || '--' }}</u-form-item>
							<u-form-item label="批准人员">{{ contDetail.approval || '--' }}</u-form-item>
							<u-form-item label="建设单位">{{ contDetail.constructionunit || '--' }}</u-form-item>
							<u-form-item label="委托单位">{{ contDetail.entrustedunit || '--' }}</u-form-item>
							<u-form-item label="监督单位">{{ contDetail.supervisionunit || '--' }}</u-form-item>
						</u-form>
					</view>
				</view>
				<view class="sitem" style="margin-top: 15px;">
					<view class="pagetitle">环境与状态信息
					</view>
					<view style="padding: 10px;">
						<u-form :model="contDetail" labelWidth="160rpx" labelAlign="right">
							<u-form-item label="温度">{{ contDetail.humidity || '--' }}</u-form-item>
							<u-form-item label="湿度">{{ contDetail.temperature || '--' }}</u-form-item>
							<u-form-item label="使用前状态">{{ contDetail.beforestatus || '--' }}</u-form-item>
							<u-form-item label="使用后状态">{{ contDetail.afterstatus || '--' }}</u-form-item>
							<u-form-item label="结论状态">
								<u-tag :text="dictFn(concrete_conclusion_status,contDetail.conclusionstatus, 0)" :type="dictFn(concrete_conclusion_status,contDetail.conclusionstatus, 1)" v-if="contDetail.conclusionstatus"></u-tag>
								<text v-else>--</text>
							</u-form-item>
						</u-form>
					</view>
				</view>
				<view class="sitem filecn" style="margin-top: 15px;" v-if="contDetail.files?.length">
					<view class="pagetitle">验证报告</view>
					<view style="padding: 10px;">
						<view style="padding: 10px;background: #f5f5f5;display: flex;align-items: center;justify-content: space-between;border-radius: 5px;margin-bottom: 5px;" v-for="(item, index) in contDetail.files" :key="index" @click="fileview(item.url)">
							<view style="width: 35px;height: 35px;background: #F54A2E;border-radius: 5px;display: flex;align-items: center;justify-content: center;">
								<u-icon name="file-text" color="#fff" size="20"></u-icon>
							</view>
							<view style="flex: 1;white-space: nowrap;text-overflow: ellipsis;overflow: hidden;margin-left: 10px;font-size: 13px;">{{ item.fileName || item.originalName || '--' }}</view>
						</view>
					</view>
				</view>
			</view>
			<view v-if="cType == 3||cType == 4||cType == 5">
				<view class="sitem">
					<view class="pagetitle">基本信息</view>
					<view style="padding: 10px;">
						<u-form :model="contDetail" labelWidth="200rpx" labelAlign="right">
							<u-form-item label="企业名称">{{ contDetail.corpname || '--' }}</u-form-item>
							<u-form-item label="报告编号">{{ contDetail.reportnum || '--' }}</u-form-item>
							<u-form-item label="工程名称">{{ contDetail.projectname || '--' }}</u-form-item>
							<u-form-item label="项目编码">{{ contDetail.projectcode || '--' }}</u-form-item>
							<u-form-item label="工程部位">{{ contDetail.projectnameposition || '--' }}</u-form-item>
							<u-form-item label="抗渗仪器号">{{ contDetail.impermeability || '--' }}</u-form-item>
							<u-form-item label="设计强度等级">{{ contDetail.strengthgrade || '--' }}</u-form-item>
							<u-form-item label="设计抗渗等级">{{ '--' }}</u-form-item>
							<u-form-item label="试件尺寸">{{ contDetail.size || '--' }}</u-form-item>
							<u-form-item label="检测龄期">{{ contDetail.age || '--' }}</u-form-item>
							<u-form-item label="成型日期">{{ contDetail.formingdate || '--' }}</u-form-item>
							<u-form-item label="检测结论">
								<u-tag :text="dictFn(concrete_conclusion_status,contDetail.testconclusion, 0)" :type="dictFn(concrete_conclusion_status,contDetail.testconclusion, 1)" v-if="contDetail.testconclusion"></u-tag>
								<text v-else>--</text>
							</u-form-item>
							<u-form-item label="检测日期">{{ contDetail.testdate || '--' }}</u-form-item>
							<u-form-item label="报告日期">{{ '--' }}</u-form-item>
						</u-form>
					</view>
				</view>
				<view class="sitem filecn" style="margin-top: 15px;" v-if="contDetail.files?.length">
					<view class="pagetitle">检测报告</view>
					<view style="padding: 10px;">
						<view style="padding: 10px;background: #f5f5f5;display: flex;align-items: center;justify-content: space-between;border-radius: 5px;margin-bottom: 5px;" v-for="(item, index) in contDetail.files" :key="index" @click="fileview(item.url)">
							<view style="width: 35px;height: 35px;background: #F54A2E;border-radius: 5px;display: flex;align-items: center;justify-content: center;">
								<u-icon name="file-text" color="#fff" size="20"></u-icon>
							</view>
							<view style="flex: 1;white-space: nowrap;text-overflow: ellipsis;overflow: hidden;margin-left: 10px;font-size: 13px;">{{ item.fileName || item.originalName || '--' }}</view>
						</view>
					</view>
				</view>
			</view>
			<view v-if="cType == 6">
				<view class="sitem">
					<view class="pagetitle">基本信息</view>
					<view style="padding: 10px;">
						<u-form :model="contDetail" labelWidth="200rpx" labelAlign="right">
							<u-form-item label="企业名称">{{ contDetail.corpname || '--' }}</u-form-item>
							<u-form-item label="评定编号">{{ contDetail.assessmentno || '--' }}</u-form-item>
							<u-form-item label="批准人编码">{{ contDetail.approveby || '--' }}</u-form-item>
							<u-form-item label="批准人">{{ contDetail.approvename || '--' }}</u-form-item>
							<u-form-item label="批准时间">{{ contDetail.approvetime || '--' }}</u-form-item>
							<u-form-item label="审核人编码">{{ contDetail.auditby || '--' }}</u-form-item>
							<u-form-item label="审核人">{{ contDetail.auditname || '--' }}</u-form-item>
							<u-form-item label="审核时间">{{ contDetail.audittime || '--' }}</u-form-item>
							<u-form-item label="评定人编码">{{ contDetail.assessby || '--' }}</u-form-item>
							<u-form-item label="评定人">{{ contDetail.assessname || '--' }}</u-form-item>
							<u-form-item label="评定时间">{{ contDetail.assesstime || '--' }}</u-form-item>
							<u-form-item label="统计开始时间">{{ contDetail.statisStart || '--' }}</u-form-item>
							<u-form-item label="统计结束时间">{{ contDetail.statisEnd || '--' }}</u-form-item>
							<u-form-item label="备注">{{ contDetail.remarks || '--' }}</u-form-item>
						</u-form>
					</view>
				</view>
			</view>
			<view v-if="cType == 7">
				<view class="sitem">
					<view class="pagetitle">基本信息</view>
					<view style="padding: 10px;">
						<u-form :model="contDetail" labelWidth="200rpx" labelAlign="right">
							<u-form-item label="生产单位">{{ contDetail.productionunit || '--' }}</u-form-item>
							<u-form-item label="合格证编号">{{ contDetail.qualifiednum || '--' }}</u-form-item>
							<u-form-item label="签发时间">{{ contDetail.issuedate || '--' }}</u-form-item>
							<u-form-item label="项目名称">{{ contDetail.projectname || '--' }}</u-form-item>
							<u-form-item label="项目编码">{{ contDetail.projectcode || '--' }}</u-form-item>
							<u-form-item label="单位工程名称">{{ contDetail.singleproject || '--' }}</u-form-item>
							<u-form-item label="施工单位">{{ contDetail.constructionunit || '--' }}</u-form-item>
							<u-form-item label="供货起止时间">{{ contDetail.supplydate || '--' }}</u-form-item>
							<u-form-item label="供货数量(m³)">{{ contDetail.supplynum || '--' }}</u-form-item>
						</u-form>
					</view>
				</view>
				<view class="sitem" style="margin-top: 15px;">
					<view class="pagetitle">技术与检测</view>
					<view style="padding: 10px;">
						<u-form :model="contDetail" labelWidth="200rpx" labelAlign="right">
							<u-form-item label="浇筑部位">{{ contDetail.pourposition || '--' }}</u-form-item>
							<u-form-item label="强度等级">{{ contDetail.strengthgrade || '--' }}</u-form-item>
							<u-form-item label="其他技术指标">{{ contDetail.othertechnology || '--' }}</u-form-item>
							<u-form-item label="技术负责人">{{ contDetail.technologyfzr || '--' }}</u-form-item>
							<u-form-item label="检测标准">{{ contDetail.teststandard || '--' }}</u-form-item>
							<u-form-item label="检测结论">{{ contDetail.testconclusion || '--' }}</u-form-item>
							<u-form-item label="数组">{{ contDetail.array || '--' }}</u-form-item>
							<u-form-item label="采用评定方法">{{ contDetail.evaluatemethod || '--' }}</u-form-item>
							<u-form-item label="强度标准值">{{ contDetail.strengthstandard || '--' }}</u-form-item>
							<u-form-item label="强度平均值">{{ contDetail.strengthaverage || '--' }}</u-form-item>
							<u-form-item label="强度最小值">{{ contDetail.strengthminimum || '--' }}</u-form-item>
							<u-form-item label="标准差">{{ contDetail.standarddifference || '--' }}</u-form-item>
							<u-form-item label="平均判断系数">{{ contDetail.averagecoefficient || '--' }}</u-form-item>
							<u-form-item label="最小判断系数">{{ contDetail.minimumcoefficient || '--' }}</u-form-item>
							<u-form-item label="结论状态">
								<u-tag :text="dictFn(concrete_conclusion_status,contDetail.conclusionstatus, 0)" :type="dictFn(concrete_conclusion_status,contDetail.conclusionstatus, 1)" v-if="contDetail.conclusionstatus"></u-tag>
								<text v-else>--</text>
							</u-form-item>
							<u-form-item label="制表人">{{ contDetail.tabulator || '--' }}</u-form-item>
						</u-form>
					</view>
				</view>
			</view>
		
			<view style="height: 180rpx;" v-if="cType == 0&&userphone==contDetail.receivingTel&&!contDetail.receivingTime">
				<view style="position: fixed;left: 0;right: 0;bottom: 0;padding: 30rpx 30rpx 60rpx 30rpx;box-shadow: 0 0 5px 2px #eee;z-index: 5;background: #fff;">
					<u-button type="primary" @click="onsubmit()">确认收货</u-button>
				</view>
			</view>
		</view>
	</view>
</template>

<script setup>
import { ref } from 'vue';
import { onLoad } from "@dcloudio/uni-app";
import { deliveryDetailEwm, MaterialcheckDetail, CoordinationDetail, CompressiveDetail, ResistanceDetail, ImpermeabilityDetail, StrengthDetail, FactorycertificateDetail,deliveryConfirm } from '@/api/qss/zxhapi.js'
import { func } from '../../uni_modules/uview-plus/libs/function/test';
const contDetail = ref({ files: [] })
const userphone = uni.getStorageSync('phone')||''
const cType = ref(0)
const pageId = ref('')
const concrete_conclusion = ref([
    { label: '合格', value: '1', type: 'primary' },
    { label: '不合格', value: '2', type: 'error' },
    { label: '未下结论', value: '3', type: 'warning' },
    { label: '未知结论', value: '4', type: 'warning' }
])
const concrete_conclusion_status = ref([
    { label: '合格', value: 'Y', type: 'primary' },
    { label: '不合格', value: 'N', type: 'error' },
    { label: '未下结论', value: 'X', type: 'warning' },
])

function onblock(){
	uni.switchTab({
		url: '/pages/index/index'
	})
}

//确认收货
function onsubmit(){
	uni.showModal({
		content: "是否确认收货",
		success: async (res) => {
			if (res.confirm) {
				let param = JSON.parse(JSON.stringify(contDetail.value))
				param.receiving = uni.getStorageSync('userInfo')?.name||'',
				param.receivingTime = newsTime()
				deliveryConfirm(param).then(ress=>{
					if(res.code == 200){
						uni.showToast({ title: "提交成功", duration: 1000 })
						contDetail.value.receivingTime = newsTime()
					}
				}).finally(()=>{
					uni.hideLoading()
				})
			}
		}
	})
}

//获取详情
function getDetail(id) {
    let requests = cType.value == 1 ? MaterialcheckDetail : cType.value == 2 ? CoordinationDetail : cType.value == 3 ? CompressiveDetail : cType.value == 4 ? ResistanceDetail : cType.value == 5 ? ImpermeabilityDetail : cType.value == 6 ? StrengthDetail : cType.value == 7 ? FactorycertificateDetail : deliveryDetailEwm
    requests(id).then(res => {
        // console.log(res, '详情')
        contDetail.value = res.data || { files: [] }
    }).finally(() => {
        
    })
}

//查看文件
function fileview(url) {
    if (url) {
        let type = url.split('.')
        type = type[type.length - 1]
		let token = uni.getStorageSync('token')
		url = url+`?platform=corp&Authorization=Bearer ${token}`
        if (type == 'jpg' || type == 'png' || type == 'jpeg' || type == 'gif' || type == 'bmp') {
			uni.previewImage({
				current: url, urls: [url]
			})
		} else {
			uni.showLoading({ title: '正在下载' })
			uni.downloadFile({
				url: url,
				// header: {Authorization: 'Bearer '+uni.getStorageSync('token')},
				success: (res) => {
					uni.hideLoading();
					if (res.statusCode == 200) {
						uni.openDocument({
							filePath: res.tempFilePath,
							showMenu: true,
							fileType: type,
							success: function(resData) {
								//打开成功
							},
							fail(err) {
								uni.showModal({showCancel: false,content: "文件类型不支持"})
							}
						})
					}
				},
				fail(err) {
					uni.hideLoading()
					uni.showModal({showCancel:false,content:"文件下载失败"})
				}
			})
		}
    } else {
		uni.showModal({showCancel: false,content: "文件路径无效"})
	}
}

//标签
function dictFn(data, val, type){
	let str = ''
	for(let s=0;s<data.length;s++){
		if(data[s].value == val){
			if(type==0){
				str = data[s].label
			} else {
				str = data[s].type
			}
		}
	}
	return str
}

//当前时间
function newsTime(){
	const date = new Date();
	const year = date.getFullYear();
	const month = String(date.getMonth() + 1).padStart(2, '0');
	const day = String(date.getDate()).padStart(2, '0');
	const hour = String(date.getHours()).padStart(2, '0');
	const minute = String(date.getMinutes()).padStart(2, '0');
	const second = String(date.getSeconds()).padStart(2, '0');
	return `${year}-${month}-${day} ${hour}:${minute}:${second}`
}

onLoad((option)=>{
	cType.value = option.type || 0
	pageId.value = option.id
	getDetail(option.id)
})

</script>

<style lang="less">
page{
	background: #f5f5f5;
}
.scancont{
	padding: 30rpx;
	.pagetitle{
		height: 90rpx;line-height: 90rpx;padding: 0 20rpx;border-bottom: 1px solid #ebebeb;
	}
	.sitem{
		background: #fff;border-radius: 5px;
	}
	.filecn{
		display: none;
	}
	::v-deep .u-form-item__body__left__content__label{
		color: #8992A5 !important;
	}
	::v-deep .u-form-item__body__right{
		padding: 10rpx 20rpx;
	}
}
</style>